"""
@Time : 2021/9/16 10:21 
@Author : 常雷
@File : t_19交并集.py 
@Software: PyCharm

给定两个list, A, B请用python找出A, B中相同的元素, A, B中不同的元素
"""
A = [1, 2, 3]
B = [2, 3, 4]
a = set(A)
b = set(B)
print(a ^ b)    # 反交际
print(a & b)    # 交集
print(a | b)    # 或集
print(a - b)    # 差集